package com.zzj.dao;

import com.zzj.bean.ProductBean;

import java.util.List;

public interface ProductDao {
    /**
     * 通过ooid查询产品
     * @param ooid
     * @return
     */
    List<ProductBean> getProductByOoid(String ooid);

    /**
     * 添加产品
     * @param productBean
     * @return
     */
    int addProduct(ProductBean productBean);

    List<ProductBean> findAll();

    List<ProductBean> findAllByOoidAndPtype(String ooid,String ptype);

    ProductBean findByPid(int pid);

    int updateProductState(int pid,String pstate,int tid);

    int updateProductStateFid(int pid,String pstate,int fid);

    int updateProductStateMid(int pid,String pstate,int mid);

    int updateStateByPid(int pid,String pstate);

    /**
     * 根据产品状态查询出所有的质检申请
     * @return
     */
    List<ProductBean> findAllQualityByState(String pstate);

}
